import request from '@/utils/request'

const api_name = '/department/system'

export default {

  getPageList(page, pageSize, name) {
    return request({
      url: `${api_name}/page/${page}/${pageSize}`,
      method: 'get',
      params: { name }
    })
  },
  getById(id) {
    return request({
      url: `${api_name}/get/${id}`,
      method: 'get'
    })
  }, 
  findAll() {
    return request({
      url: `${api_name}/findAll`,
      method: 'get'
    })
  },

  save(department) {
    return request({
      url: `${api_name}/add`,
      method: 'post',
      data: department
    })
  },

  updateById(department) {
    return request({
      url: `${api_name}/update`,
      method: 'put',
      data: department
    })
  },
  removeById(id) {
    return request({
      url: `${api_name}/delete/${id}`,
      method: 'get'
    })
  }

}
